Draw Request
This endpoint posts a list of draw requests to loan accounts. Authorization is required.
HTTP REQUEST
Development
POST: https://dev.vendorintegration.growersedge.com/DrawRequest
Production
POST: https://vendorintegration.growersedge.com/DrawRequest
Responses
Code | Description |
---|---|
204 | No Content |
400 | Bad Request |
401 | Unauthorized |
500 | Internal Server Error |
502 | Bad Gateway |
Bad Request Errors
Error | Decription |
---|---|
Invalid Loan Number | The provided loan number is incorrect. If you are certain this number is correct, please contact your Growers Edge representative |
Invalid Amount | The Amount must be between $1 and the Available Credit remaining for the loan |
Invalid Funding Investor | A funding investor has not been correctly assigned for the loan. Please contact your Growers Edge representative |
Invalid Authorization | The partner identified within the token used does not match the partner associated with the loan |
Pending Transaction Request | A Draw Request is pending on loan, as only one draw request can be submitted per day |
Post Body
A list of draw request objects following the format below
Property Name | Type | Description |
---|---|---|
loanNumber | number | The loan number to apply the payment to |
requestor | string | The id of the requestor |
amount | number | The amount paid in dollars |
Example of Post Body
[
{
"LoanNumber": 1234,
"Requestor": "John Doe",
"Amount": 500
},
{
"LoanNumber": 4321,
"Requestor": "Jane Doe",
"Amount": 501
}
]
Examples
from azure.identity import CertificateCredential
import requests
TENANT_ID = '***'
CLIENT_ID = '***'
CLIENT_SECRET = '***'
CLIENT_SCOPE = '***'
POST_URL = 'https://vendorintegration.growersedge.com/DrawRequest'
def post( token : str) :
payload = "[{
"LoanNumber": "1234",
"Requestor": "John Doe",
"Amount": 500
}]"
requestResponse = requests.post(
POST_URL,
headers = { 'Authorization' : f'Bearer {token}'},
json= payload
)
if( requestResponse.status_code == 204 ):
return
else:
raise( Exception( 'API Call failed.') )
def main():
credential = ClientSecretCredential( TENANT_ID, CLIENT_ID, CLIENT_SECRET )
access_token = credential.get_token( CLIENT_SCOPE )
print (post(access_token.token))
if __name__ == '__main__':
main()
curl --request POST \
--url https://vendorintegration.growersedge.com/DrawRequest \
--header 'Authorization: Bearer <INSERT YOUR TOKEN>' \
--header 'Content-Type: application/json' \
--data '[{
"LoanNumber": "1234",
"Requestor": "John Doe",
"Amount": 500
}]'